package com.fansl.allround.upms.controller.inner;

import com.fansl.allround.common.security.annotation.Inner;
import com.fansl.allround.upms.api.entity.SysRegion;
import com.fansl.allround.upms.service.SysRegionService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author fansl
 * @Description: 区域控制器 内部使用
 * @date 2020/1/15 15:09
 */
@Slf4j
@RestController
@AllArgsConstructor
@RequestMapping("/inner/region")
public class RegionInnerController {
    private final SysRegionService sysRegionService;

    @PostMapping("/save")
    @Inner
    public Boolean saveBatch(@RequestBody List<SysRegion> sysRegions){
        return sysRegionService.saveBatch(sysRegions);
    }
}
